package com.sourcetrip.arraylist;


import com.sourcetrip.raw.model.Skill;

/**
 * @author: ZhouBert
 * @date: 2020/11/16
 * @description:
 */
public class ShallowCopy {

	public static void main(String[] args) throws CloneNotSupportedException {
		Skill skill1 = new Skill("bull shit");
		Skill skill2 = (Skill) skill1.clone();
		//可见 浅拷贝的地址是不同的
		System.out.println("判断 shallow copy 的地址："+(skill1 == skill2));
		System.out.println("skill1 = " + skill1);
		System.out.println("skill2 = " + skill2);
		//
	}
}
